package com.ruoyi.offline.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.offline.mapper.ItemGoodsmanagerMapper;
import com.ruoyi.offline.domain.ItemGoodsmanager;
import com.ruoyi.offline.service.IItemGoodsmanagerService;

/**
 * 商品经理Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-29
 */
@Service
public class ItemGoodsmanagerServiceImpl implements IItemGoodsmanagerService 
{
    @Autowired
    private ItemGoodsmanagerMapper itemGoodsmanagerMapper;

    /**
     * 查询商品经理
     * 
     * @param id 商品经理主键
     * @return 商品经理
     */
    @Override
    public ItemGoodsmanager selectItemGoodsmanagerById(Long id)
    {
        return itemGoodsmanagerMapper.selectItemGoodsmanagerById(id);
    }

    /**
     * 查询商品经理列表
     * 
     * @param itemGoodsmanager 商品经理
     * @return 商品经理
     */
    @Override
    public List<ItemGoodsmanager> selectItemGoodsmanagerList(ItemGoodsmanager itemGoodsmanager)
    {
        return itemGoodsmanagerMapper.selectItemGoodsmanagerList(itemGoodsmanager);
    }

    /**
     * 新增商品经理
     * 
     * @param itemGoodsmanager 商品经理
     * @return 结果
     */
    @Override
    public int insertItemGoodsmanager(ItemGoodsmanager itemGoodsmanager)
    {
        return itemGoodsmanagerMapper.insertItemGoodsmanager(itemGoodsmanager);
    }

    /**
     * 修改商品经理
     * 
     * @param itemGoodsmanager 商品经理
     * @return 结果
     */
    @Override
    public int updateItemGoodsmanager(ItemGoodsmanager itemGoodsmanager)
    {
        itemGoodsmanager.setUpdateTime(DateUtils.getNowDate());
        return itemGoodsmanagerMapper.updateItemGoodsmanager(itemGoodsmanager);
    }

    /**
     * 批量删除商品经理
     * 
     * @param ids 需要删除的商品经理主键
     * @return 结果
     */
    @Override
    public int deleteItemGoodsmanagerByIds(Long[] ids)
    {
        return itemGoodsmanagerMapper.deleteItemGoodsmanagerByIds(ids);
    }

    /**
     * 删除商品经理信息
     * 
     * @param id 商品经理主键
     * @return 结果
     */
    @Override
    public int deleteItemGoodsmanagerById(Long id)
    {
        return itemGoodsmanagerMapper.deleteItemGoodsmanagerById(id);
    }
}
